package cn.jly.spring.boot.cloud.controller;

import cn.jly.spring.boot.cloud.dao.EmployeeDao;
import cn.jly.spring.boot.cloud.utils.ResultBase;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author lanyangji
 * @description employee控制器
 * @date 2020/11/24 下午 3:39
 */
@RestController
public class EmployeeController {

    @Autowired
    private EmployeeDao employeeDao;

    @GetMapping("/emps")
    public ResultBase getEmployees() {
        return ResultBase.build(200, "query success", employeeDao.getList());
    }
}
